package com.code2roc.obscure.demo.pk1;

import com.code2roc.obscure.demo.*;
import com.code2roc.obscure.work.OutInterface;
import com.code2roc.obscure.work.OutParentClass;

@AnnotaionClass(value = EnumClass.HighLevel, name = "123", test = {ConstantClass.class}, test2 = ConstantClass.class)
public class MethodClass extends OutParentClass implements InterfaceClass, OutInterface {
    public ModelClass createStudent(String name, String cardNo) throws Exception {
        ModelClass entity = new ModelClass();
        entity.setName(name);
        entity.setCardNo(cardNo);
        String levelInfo = "哈哈哈哈哈";
        entity.setLevelInfo(levelInfo);
        String classNo = "三年级";
        entity.setClassNo(classNo);
        return entity;
    }

    @MethodAnnotationClass(value = ConstantClass.class, methodTag = {ConstantClass.class})
    public static String getStudentDes(ModelClass entity) {
        StringBuilder des = new StringBuilder();
        des.append("=========================Student Start==========================" + System.getProperty("line.separator"));
        des.append("【name】:" + entity.getName() + System.getProperty("line.separator"));
        des.append("【levelInfo】:" + entity.getLevelInfo() + System.getProperty("line.separator"));
        des.append("【calssNo】:" + entity.getClassNo() + System.getProperty("line.separator"));
        des.append("【cardNo】:" + entity.getCardNo() + System.getProperty("line.separator"));
        des.append("【flag】:" + entity.getFlag() + System.getProperty("line.separator"));
        des.append("【status】:" + entity.getStatus() + System.getProperty("line.separator"));
        des.append("=========================Student end==========================" + System.getProperty("line.separator"));
        return des.toString();
    }

    @Override
    public void handleInfo() {
        System.out.println("handle Class Success");
    }

    @Override
    public String handleUser() {
        return "userxxx";
    }

    @Override
    public String test2(String a) {
        return a + "123|321";
    }
}
